<?php

include_once 'connection/connection_database.php';

class Banner {

    function FillBannerTop(){
        $sql = "SELECT * FROM banner WHERE banner_display='0' LIMIT 1";
        $result = mysql_query($sql) or die(mysql_error());
        return mysql_fetch_array($result);
    }
    
    function FillOneBanerRight1() {
        $sql = "SELECT * FROM banner WHERE banner_display='1' and banner_order='1'";
        $result = mysql_query($sql) or die(mysql_error());
        return mysql_fetch_array($result);
    }
    
    function FillOneBanerRight2() {
        $sql = "SELECT * FROM banner WHERE banner_display='1' and banner_order='2'";
        $result = mysql_query($sql) or die(mysql_error());
        return mysql_fetch_array($result);
    }
    
    function FillOneBanerRight3() {
        $sql = "SELECT * FROM banner WHERE banner_display='1' and banner_order>2 ORDER BY banner_id ASC";
        $result = mysql_query($sql) or die(mysql_error());
        return $result;
    }
}

?>
